package org.buptsse.entity;

import java.io.Serializable;

import org.buptsse.utils.GloableInstance;

public class HistoryItem implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String dealid,bookname,price,bookimage,buyer,seller,starttime,endtime,role,action;

	public String getDealid() {
		return dealid;
	}

	public void setDealid(String dealid) {
		this.dealid = dealid;
	}

	public String getBookname() {
		return bookname;
	}

	public void setBookname(String bookname) {
		this.bookname = bookname;
	}

	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	public String getBookimage() {
		return bookimage;
	}

	public void setBookimage(String bookimage) {
		this.bookimage = bookimage;
	}

	public String getBuyer() {
		return buyer;
	}

	public void setBuyer(String buyer) {
		this.buyer = buyer;
		if(buyer.equals(GloableInstance.user.getName()))
		{
			role="买家";
			action="买入";
		}
	}

	public String getSeller() {
		return seller;
	}

	public String getRole()
	{
		return role;
	}
	public String getAction()
	{
		return action;
	}
	
	public void setSeller(String seller) {
		this.seller = seller;
		if(seller.equals(GloableInstance.user.getName()))
		{
			role="卖家";
			action="卖出";
		}
	}

	public String getBegintime() {
		return starttime;
	}

	public void setBegintime(String begintime) {
		this.starttime = begintime;
	}

	public String getEndtime() {
		return endtime;
	}

	public void setEndtime(String endtime) {
		this.endtime = endtime;
	}
	
}
